package com.ruoyi.qsng.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.SnowFlakeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qsng.mapper.KClearinghouseFocusMapper;
import com.ruoyi.qsng.domain.KClearinghouseFocus;
import com.ruoyi.qsng.service.IKClearinghouseFocusService;

/**
 * 交流中心_关注Service业务层处理
 * 
 * @author kanglou
 * @date 2023-06-07
 */
@Service
public class KClearinghouseFocusServiceImpl implements IKClearinghouseFocusService 
{
    @Autowired
    private KClearinghouseFocusMapper kClearinghouseFocusMapper;

    /**
     * 查询交流中心_关注
     * 
     * @param id 交流中心_关注主键
     * @return 交流中心_关注
     */
    @Override
    public KClearinghouseFocus selectKClearinghouseFocusById(String id)
    {
        return kClearinghouseFocusMapper.selectKClearinghouseFocusById(id);
    }

    /**
     * 查询交流中心_关注列表
     * 
     * @param kClearinghouseFocus 交流中心_关注
     * @return 交流中心_关注
     */
    @Override
    public List<KClearinghouseFocus> selectKClearinghouseFocusList(KClearinghouseFocus kClearinghouseFocus)
    {
        return kClearinghouseFocusMapper.selectKClearinghouseFocusList(kClearinghouseFocus);
    }

    /**
     * 新增交流中心_关注
     * 
     * @param kClearinghouseFocus 交流中心_关注
     * @return 结果
     */
    @Override
    public int insertKClearinghouseFocus(KClearinghouseFocus kClearinghouseFocus)
    {
        kClearinghouseFocus.setId(SnowFlakeUtil.getNextId());
        kClearinghouseFocus.setCreateTime(DateUtils.getNowDate());
        return kClearinghouseFocusMapper.insertKClearinghouseFocus(kClearinghouseFocus);
    }

    /**
     * 修改交流中心_关注
     * 
     * @param kClearinghouseFocus 交流中心_关注
     * @return 结果
     */
    @Override
    public int updateKClearinghouseFocus(KClearinghouseFocus kClearinghouseFocus)
    {
        kClearinghouseFocus.setUpdateTime(DateUtils.getNowDate());
        return kClearinghouseFocusMapper.updateKClearinghouseFocus(kClearinghouseFocus);
    }

    /**
     * 批量删除交流中心_关注
     * 
     * @param ids 需要删除的交流中心_关注主键
     * @return 结果
     */
    @Override
    public int deleteKClearinghouseFocusByIds(String[] ids)
    {
        return kClearinghouseFocusMapper.deleteKClearinghouseFocusByIds(ids);
    }

    /**
     * 删除交流中心_关注信息
     * 
     * @param id 交流中心_关注主键
     * @return 结果
     */
    @Override
    public int deleteKClearinghouseFocusById(String id)
    {
        return kClearinghouseFocusMapper.deleteKClearinghouseFocusById(id);
    }
}
